<?php

namespace App\Models;

class Configs extends Base
{

    protected $table = 'configs';
    public $timestamps = false;
    protected $fillable = [
        'id','key','value'
    ];
    protected $casts = ['value'=>'array'];


    protected function info($key = 'integral'){
        //积分规则
        $info = Configs::where('key',$key)->first()->toArray();
        return $info['value'];
    }




}
